﻿using TransformerSystem.Shell.Views;
using Prism.Ioc;
using Prism.Modularity;
using System.Windows;
using YanYiSmartTechnology.Module;
using Prism.DryIoc;
using TransformerSystem.Core;
using TransformerSystem.Device;

namespace TransformerSystem.Shell
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : PrismApplication
    { 
        protected override Window CreateShell()
        {
            return Container.Resolve<MainWindow>();
        }

        protected override void RegisterTypes(IContainerRegistry containerRegistry)
        {
            containerRegistry.RegisterDialogWindow<DialogWindow>();
            containerRegistry.RegisterScoped<ILoggerService, LoggerService>();
            containerRegistry.RegisterScoped<ILanguageService, LanguageService>();
            containerRegistry.RegisterScoped<IDeviceService, DeviceService>();
        }
        protected override void ConfigureModuleCatalog(IModuleCatalog moduleCatalog)
        {
            base.ConfigureModuleCatalog(moduleCatalog);
            moduleCatalog.AddModule<YanYiModule>();
        }
    }
}
